#include "x_setup.sqf"
class XD_AdminDialog {
	idd = -1;
	movingEnable = 1;
	onLoad = "if (serverCommandAvailable '#shutdown' || !isMultiplayer) then {uiNamespace setVariable ['D_ADMIN_DLG', _this select 0];d_admin_dialog_open = true;d_do_ma_update_n = true} else {['d_p_f_b_k', [player, name player, 3]] call d_fnc_NetCallEventCTS}";
	onUnLoad = "uiNamespace setVariable ['D_ADMIN_DLG', nil];d_admin_dialog_open = false;d_do_ma_update_n = false";
	class controlsBackground {
		class XD_BackGroundCaption: XC_RscText {
			x = 0; y = 0;
			w = 1; h = 1 / 25;
			colorBackground[] = __GUI_BCG_RGB;
		};
		class XD_MainCaption: XC_RscText {
			x = 0.02; y = 0;
			w = 0.25; h = 0.04;
			sizeEx = 0.04;
			colorBackground[] = {1, 1, 1, 0};
			XCTextBI;
			text = "$STR_DOM_MISSIONSTRING_1219";
		};
		class XD_BackGroundMain: XC_RscText {
			colorBackground[] = {0, 0, 0, 0.7};
			x = 0;
			y = (1 / 25) + 0.005;
			w = 1;
			h = 1 - (2 / 25) - 0.01;
		};
		/*class XD_BackGroundBottom: XC_RscText {
			x = 0; y = 1 - (1 / 25);
			w = 1; h = 1 / 25;
			colorBackground[] = __GUI_BCG_RGB;
		};*/
		class DomVer: XC_RscText {
			x = 0.02; y = 1 - 0.04;
			w = 0.25; h = 0.04;
			sizeEx = 0.04;
			colorBackground[] = {1, 1, 1, 0};
			XCTextBI;
			text = __DOM_NVER_STR__;
		};
	};
	class controls {
		class XD_CloseButton: XD_ButtonBase {
			idc = -1;
			text = "$STR_DOM_MISSIONSTRING_1218"; 
			action = "closeDialog 0";
			default = true;
			x = 0.7; y = 1 - 0.04;
		};
		class XD_Map : XD_RscMapControl {
			idc = 11010;
			colorBackground[] = {0.9, 0.9, 0.9, 0.9};
			x = 0.08; y = 0.54;
			w = 0.84; h = 0.33;
			showCountourInterval = false;
		};
		class UnitsComboCaption : XC_RscText {
			x = 0.08; y = 0.08;
			w = 0.2; h = 0.1;
			sizeEx = 0.032;
			colorBackground[] = {1, 1, 1, 0};
			XCTextBlack;
			shadow = 0;
			text = "$STR_DOM_MISSIONSTRING_1220";
		};
		class UnitsCombo:XD_UIComboBox {
			idc = 1001;
			x = 0.08; y = 0.16;
			w = 0.25; h = 0.04;
			sizeEx = 0.032;
			onLBSelChanged = "[_this] spawn d_fnc_adselchanged";
		};
		class InfoText : UnitsComboCaption {
			idc = 1002;
			x = 0.4; y = 0.09;
			w = 0.55; h = 0.1;
			text = "";
		};
		class NameCaption : UnitsComboCaption {
			x = 0.4; y = 0.14;
			w = 0.07; h = 0.1;
			text = "$STR_DOM_MISSIONSTRING_1221";
		};
		class NameText : UnitsComboCaption {
			idc = 1003;
			x = 0.48; y = 0.14;
			w = 0.3; h = 0.1;
			text = "";
		};
		class UidCaption : UnitsComboCaption {
			x = 0.4; y = 0.18;
			w = 0.07; h = 0.1;
			text = "UID:";
		};
		class UidText : UnitsComboCaption {
			idc = 1004;
			x = 0.48; y = 0.18;
			w = 0.3; h = 0.1;
			text = "";
		};
		class StrNameCaption : UnitsComboCaption {
			x = 0.4; y = 0.22;
			w = 0.07; h = 0.1;
			text = "$STR_DOM_MISSIONSTRING_1222";
		};
		class StrNameText : UnitsComboCaption {
			idc = 1005;
			x = 0.48; y = 0.22;
			w = 0.3; h = 0.1;
			text = "";
		};
		class TKCaption : UnitsComboCaption {
			x = 0.4; y = 0.26;
			w = 0.07; h = 0.1;
			text = "TKs:";
		};
		class TKText : UnitsComboCaption {
			idc = 1006;
			x = 0.48; y = 0.26;
			w = 0.3; h = 0.1;
			text = "";
		};
		class ScoreCaption : UnitsComboCaption {
			x = 0.4; y = 0.3;
			w = 0.07; h = 0.1;
			text = "$STR_DOM_MISSIONSTRING_1223";
		};
		class ScoreText : UnitsComboCaption {
			idc = 1009;
			x = 0.48; y = 0.3;
			w = 0.3; h = 0.1;
			text = "";
		};
		class ResetTKsButton: XD_ButtonBase2 {
			idc = 1007;
			text = "$STR_DOM_MISSIONSTRING_1224"; 
			action = "['d_ad_deltk', d_a_d_cur_uid] call d_fnc_NetCallEventCTS;((uiNamespace getVariable 'D_ADMIN_DLG') displayCtrl 1006) ctrlSetText '0';((uiNamespace getVariable 'D_ADMIN_DLG') displayCtrl 1007) ctrlEnable false";
			x = 0.4; y = 0.38; w = 0.2;
		};
		class KickButton: XD_ButtonBase2 {
			idc = 1008;
			text = "$STR_DOM_MISSIONSTRING_1225"; 
			action = "if (d_a_d_cur_name != d_name_pl) then {serverCommand ('#kick ' + d_a_d_cur_name);d_a_d_p_kicked = true}";
			x = 0.65; y = 0.38; w = 0.2;
		};
		class SpectateButton: XD_ButtonBase2 {
			idc = -1;
			text = "$STR_DOM_MISSIONSTRING_1226"; 
			action = "closeDialog 0;call d_fnc_adminspectate";
			x = 0.4; y = 0.46; w = 0.2;
		};
		class BanButton: XD_ButtonBase2 {
			idc = 1010;
			text = "$STR_DOM_MISSIONSTRING_1227"; 
			action = "if (d_a_d_cur_name != d_name_pl) then {serverCommand ('#exec ban ' + d_a_d_cur_name);d_a_d_p_kicked = true}";
			x = 0.65; y = 0.46; w = 0.2;
		};
	};
};
